<template>
	<view class="complaint-status">
		<ComplaintTag :bgColor="currStyle.bgColor" :color="currStyle.color" :text="currStyle.text" />
	</view>
</template>

<script>
	import ComplaintTag from '@/components/user/ComplaintTag.vue';
	import ComplaintStatusEnum from '@/common/enum/ComplaintStatus.js';
	
	export default {
		name:"ComplaintStatus",
		components: {
			ComplaintTag
		},
		props: {
			status: {
				type: Number
			}
		},
		data() {
			return {
				styleObj: {
					[ComplaintStatusEnum.PROCESSING.value]: {
						bgColor: '#273368',
						color: '#fff',
						text: ComplaintStatusEnum.PROCESSING.name
					},
					
					[ComplaintStatusEnum.CLOSED.value]: {
						bgColor: '#D0D0D1',
						color: '#313131',
						text: ComplaintStatusEnum.CLOSED.name
					},
					
					[ComplaintStatusEnum.CANCELED.value]: {
						bgColor: '#fff',
						color: '#313131',
						text: ComplaintStatusEnum.CANCELED.name
					}
				}
			};
		},
		computed: {
			currStyle() {
				return this.styleObj[this.status]
			}
		}
	}
</script>

<style scoped lang="scss">
.complaint-status{
	
}
</style>
